<template>
  <div class="hotsale">
    <ul>
      <li v-for="item in hotlist" :key="item.id" @click="$router.push(`/detail?id=${item.id}`)">
        <img :src="item.pic" alt="" />
        <h4>{{ item.name }}</h4>
        <p>{{ item.characteristic }}</p>
        <p>￥{{ item.originalPrice }}</p>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: ["hotlist"],
  data() {
    return {};
  },
  created() {},
  mounted() {},
  methods: {},
  computed: {},
};
</script>

<style scoped lang="scss">
.hotsale {
  width: 100%;
  ul {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    li {
      width: 50%;
      padding: 5px;
      img {
        width: 100%;
        height: 210px;
        border-radius: 5px;
      }
      h4 {
        font-weight: lighter;
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      p:nth-of-type(1) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
        color: #ccc;
      }
      p:nth-of-type(2){
          color: red;
          font-size: 14px;
      }
    }
  }
}
</style>
